<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="com.zzc.pojo.Product"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
<body>
<div id="all" style="border:3px solid #F00;height:1183px;width:1000px;margin:0 auto;" >
	<div id="top" style="width:960px;background-color:#FFF;">
    	<div id="logo" >
    		<img alt="公司LOGO" src="img/logo.jpg" width="1000px" />
    	</div>
        <div id="navi" style="width:1000;background-color:#CC0005;height:40px;float:left;">
        	<ul style="width:960px;">
            	<li style="display:inline;margin-left:120px;"><a href="index.jsp" style="color:#FFF;font-weight:bold;">首页</a></li>
            	<li style="display:inline;margin-left:50px;"><a href="manage/manage.jsp" style="color:#FFF;font-weight:bold;">商品管理</a></li>
              	<li style="display:inline;margin-left:50px;"><a href="" style="color:#FFF;font-weight:bold;">周边服务</a></li>
				<li style="display:inline;margin-left:50px;"><a href="" style="color:#FFF;font-weight:bold;">商品分类</a></li>
				<li style="display:inline;margin-left:50px;"><a href="" style="color:#FFF;font-weight:bold;">留言簿</a></li>
                <li style="display:inline;margin-left:50px;"><a href="" style="color:#FFF;font-weight:bold;">关于我们</a></li>
                <li style="display:inline;margin-left:50px;color:#FFF;background-color:#999"><a style="color:#FFF;font-weight:bold;font-size:14px;">已登陆</a> 
        </div>
    </div> 
    <div id="center" style="height:600px;text-align:center;margin-top:150px">
    	<div style="width:250px;height:100px;margin-top:-100px;margin-left:100px">
    		<img src="img/usertest.png" width="70px" height="70px" style="display:block;float:left;" />
						
    		<h5 style="display:block;float:left;">欢迎您：
</h5>
    	</div>
    	<div style="width:170px;margin-left:auto;margin-right:auto;margin-top:-40px;">
    		<h1 style="margin-bottom:20px;">商品展示</h1>
    		<a href="springmvc/cart/findcart?uid=${myuser.uid}">查看购物车</a>
    		<a href="pro_update.jsp">商品管理</a>
    	</div>
    	
		<div id="part" style="width:1000px;height:500px;float:left;border:1px solid #FF0000">
		
		<c:forEach  items="${productlist}" var="p">
			<div style="border:3px solid #F00;height:150px;margin-left:80px;width:224px;float:left;margin-top:20px">
				<img alt="商品1" src="${p.pimg}" height="150px" width="120px" style="float:left">
				<div style="height:150px;width:102px;float:right;border:1px solid #F00">
					<h4 style="display:block;margin-left:-10px">名称:${p.pname}</h4>
					<h4 style="display:block;margin-left:-10px">库存:${p.pnum}</h4>
					<h4 style="display:block;margin-left:-10px">单价:${p.pprice}</h4>
					<c:if test="${p.paddr == null}">
					<h4><a href="springmvc/storage/savepro?pid=${p.pid}" style="display:block;width:45px;height:10px;margin-top:-15px;background-color:#DDDDDD;margin-left:30px">入库</a></h4>
					</c:if>
					<c:if test="${p.paddr != null}">
					<h4><a href="springmvc/storage/savepro2?pid=${p.pid}" style="display:block;width:45px;height:10px;margin-top:-14px;background-color:#DDDDDD;margin-left:55px">出库</a></h4>
					<h4><a href="springmvc/cart/addcart?pid=${p.pid}&uid=${myuser.uid}" style="display:block;width:45px;height:10px;margin-top:-31px;background-color:#DDDDDD;margin-left:4px">调库</a></h4>
					</c:if>
				</div>
			</div>
		</c:forEach>
		</div>
		
    </div> 
    
    <div id="bottom" style="margin-top:150px;">
    	<img alt="页面底部" src="img/bottom.jpg" width="1000px" height="50px"/>
    </div>
    <h5 style="text-align:center;color:#666;">版权所属  千里马创业团队  隐私保护</h5>
    <h5 style="text-align:center;color:#666;">联系电话：123456  意见邮箱：123456@qq.com</h5>
</div>
</body>
</html>
